package exam.test19;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Endstart
 * Date: 2020-12-22
 * Time: 4:44
 */
public class Node {
    private int name;
    private int label;
    boolean marked;
    private Node[] neighbours;
    private Edge[] incident;

    public Node(int newName) {
        name = newName;
        marked = false;
    }

    public Node(int newLabel,int newName) {
        label = newLabel;
        marked = false;
        name = newName;
    }

    public void mark() {
        marked = true;
    }

    public void unmark() {
        marked = false;
    }

    public int getLabel() {
        return label;
    }

    public Node[] getNeighbours() {
        return neighbours;
    }

    public Edge[] getIncidentEdges() {
        return incident;
    }

    public void addNode(Node[] newNodes) {
        neighbours = newNodes;
    }

    public void addEdge(Edge[] newEdges) {
        incident = newEdges;
    }

    public int getName() {
        return name;
    }

    public int degree() {
        return incident.length;
    }
}
